The present invention relates to a method and a device for refreshing the memory content of at least one memory cell of a read-only memory. The present invention also relates to a digital controller for controlling and/or regulating certain functions in a motor vehicle and having a microcomputer for processing a control program stored at least partially in a read-only memory.
A digital controller is used in a motor vehicle to control and/or regulate certain functions in the motor vehicle. In particular, controllers are used to control/regulate the internal combustion engine, the transmission, the brakes, the heating, and the air conditioning.
The controller includes a microcomputer having a microprocessor, a program memory, a variable memory and input and output circuits. The microprocessor is the central control unit and processing unit, i.e., a central processing unit (CPU). The program memory contains a sequence of commands to be processed by the microprocessor, that is, the control program. Generally, the program memory is a read-only memory because the control program must be preserved even after a failure of the operating voltage. The variables generated during the processing of the control program and needed for running the control program are stored in the variable memory. The variable memory is usually composed of a read-write memory with random access (random access memory, RAM). Communication with peripheral devices such as a data display unit, a keyboard, a mass memory, etc. can take place over the input and output circuits. For example, three bus systems are provided for communication between the microprocessor with the program memory, the data memory and the input and output circuits. The microprocessor indicates a desired memory address over an address bus. Over a control bus, the microprocessor determines whether reading or writing is to be performed. The data exchange takes place over a data bus.
Read-only memories are also denoted as ROMs. In addition to being provided as the program memory, read-only memories are also used for other functions in a microprocessor. In the normal case, read-only memories can only be read, so they are suitable for storing tables and programs. The content of the read-only memories is preserved for a finite period of time when the operating voltage is turned off. This period of time is in the range of approximately several years.
An EEPROM (electronically erasable ROM) is a special type of ROM. This component is a memory that can be programmed and erased electrically. The stored information is preserved even after the power supply is turned off.
Immediately after programming the memory cells of a read-only memory, the charge status is at a programming charge. Because of parasitic effects in the memory cell, the charge of the memory cells drops continuously starting from the programming charge during the finite period of time until it is ultimately below a reading charge. The reading charge is the charge of a memory cell necessary for the memory sense amplifier to be able to detect the correct status (programmed/erased). A drop in the charge status of memory cells below the reading charge level results in information stored in the memory cells being read incorrectly. Then, a program code cannot be executed correctly, resulting in a malfunction or even total failure of the microcomputer and thus, of the controller.
The present invention provides a method and device to aid in preventing a malfunction or failure of a microcomputer accessing a read-only memory due to data loss in a read-only memory.
The present invention provides a method that may include the following steps:
determining the instantaneous charge status of the memory cell;
comparing the instantaneous charge status of the memory cell with a charge threshold which is above a reading charge necessary for correct detection of the content of the memory cell; and
increasing the charge status of the memory cell if the instantaneous charge status of the memory cell is below the charge threshold.
The charge status of the memory cell of the read-only memory is charged up to a programming charge (or an erase charge) as part of the programming or reprogramming of the memory cell. Because of parasitic effects, for example, traps in the oxides, in the memory cell, the charge status of the memory cell drops slowly over a finite period of several years starting from the programing charge/erase charge. The variation in the discharge over time may depend greatly on ambient parameters, for example, the ambient temperature, and therefore can be predicted only inadequately. Therefore, according to the present invention, the charge status of the memory cell during this period of time is compared with a charge threshold which is above the reading charge, in order to correctly detect the programming/erase state of a memory cell. When the charge status of the memory cell drops below the reading charge, data loss can occur in the memory cell. Therefore, the charge status of the memory cell is increased as soon as the instantaneous charge status of the memory cell drops below the charge threshold, that is, before data stored in the memory cell can be lost.
Through the method according to the present invention, the lifetime of the data in a read-only memory can be significantly prolonged. This is of interest in particular for those read-only memories which are part of a microcomputer of a controller for a motor vehicle, because the information stored in the read-only memory is correctly preserved even when there is a loss of charge of the memory cells due to the refresh.
The charge threshold is set so far above the reading charge that the information stored in the memory cell can still be read reliably at the charge threshold even in the worst case, e.g., at especially high temperatures.
For each memory cell, for each block having a plurality of memory cell or for each read-only memory having a plurality of blocks, the method according to the present invention determines the optimum time for raising the charge status of the memory cell. If the charge status of a memory cell has dropped below the charge threshold, the charge status of the memory cells of the block in which this memory cell can be arranged or the charge status of all the memory cells of the read-only memory can be raised. The method according to the present invention also makes it possible to take into account tolerances in manufacturing the memory cells of a read-only memory or component scattering with regard to the finite period of time for which the maintenance of charge of the memory cell is guaranteed.
The method according to the present invention can be used universally for various read-only memories. Except for a refresh circuit, no additional hardware is required in the read-only memory or in the microcomputer in order to implement this method. The refresh circuit can be integrated into the read-only memory.
According to an embodiment of the present invention, the charge status of the memory cell can be raised to the programming charge of a freshly programmed memory cell. According to this embodiment, the charge status of a memory cell whose charge status has been raised can again be above the reading charge for a finite period of time. Thus, the charge of the memory cell can be maintained for additional years.
According to another embodiment of the present invention, to increase the charge status of the memory cell, the content of the memory cell is stored temporarily in another memory cell, the memory cell is erased and the content of the additional memory cell is programmed again into the memory cell. To a certain extent, in increasing the charge status of a memory cell, the memory cell is in a way reprogrammed with its own memory content. The programming operation takes place in a conventional manner according to the related art by applying a programming voltage to the programming voltage pin of the read-only memory.
To determine the instantaneous charge status of the memory cell, a conventional margin-read method according to the related art can be used. The margin-read method can be used in programming or erasing a memory cell of an EPROM, an EEPROM or a flash memory, to determine whether a sufficiently high charge is applied to the memory cell for programming/erasing. According to another embodiment of the present invention, to determine the instantaneous charge status of the memory cell, a test voltage higher than the operating voltage can be applied to the memory cell in a test operation of the memory cell. This voltage can be checked to determine whether the charge of the memory cell is sufficient to invert the charge of a first capacitive load connected to the memory cell. According to this embodiment, the margin-read method can be used to determine whether a sufficiently high charge is applied to the memory cell to be able to detect the correct status, for example, programmed or erased, of the memory cell.
In an alternative embodiment of the present invention, to determine the instantaneous charge status of the memory cell, a check can be performed in a test operation of the memory cell with the operating voltage applied to the memory cell to determine whether the charge of the memory cell is sufficient to invert the charge of a second capacitive load which is connected to the memory cell and is greater than the first capacitive load.
Through these two alternative embodiments, a check is performed in the test operation to determine whether the charge status has dropped below the charge threshold. In the test operation, the curve of the memory cell charge status can be shifted toward a lower charge to a certain extent by the test voltage or by the greater capacitive load. If the shifted curve of the charge status drops below the reading charge; however, the actual curve of the charge status has just dropped below the charge threshold.
In normal operation of the memory cell, the operating voltage may be applied to the programming voltage pin of the read-only memory, and the first capacitor (bit line) can be connected to the memory cell. To ascertain whether the instantaneous charge status of the memory cell is below the charge threshold, the memory content can be read out of the memory cell once in normal operation and once in test operation, and the memory contents read out in both operations can then be compared.
The method according to the present invention can be carried out in blocks of a plurality of memory cells of a read-only memory, with a first checksum being formed from the memory content of all the memory cells of a block in normal operation, and a second checksum being formed in test operation from the memory cells of this block, and the two checksums being compared. If the two checksums deviate from one another, then the charge status of at least one memory cell of the block has dropped below the charge threshold, and consequently the charge status of a all memory cells of the block is raised.
According to another embodiment of the present invention, the method can be used to maintain the content of a memory cell of a read-only memory which is part of a microcomputer of a digital controller for a motor vehicle. This method according to the present invention can be carried out while the motor vehicle is being driven and/or during hunting operation of the controller. After a main switch or the ignition key of the motor vehicle has been switched off, the controller runs through a hunting operation to run down all the functions to be controlled in the motor vehicle in a controlled manner. During this hunting operation of the controller, the charge status of the memory cells of the read-only memories can also be checked and optionally increased. As an alternative, the method according to the present invention can also be carried out after turning on the controller during lead time.
The method according to the present invention may be carried out as a function of the operating time, the distance traveled and/or the number of driving cycles of the motor vehicle. A driving cycle is initiated by turning on a main switch or the ignition key and is ended by turning off the main switch or the ignition key. Since the finite period of time of several years for which it is guaranteed that a charge will be maintained for the memory cells is relatively long, it is completely sufficient to test the charge status of the memory cells at such long intervals to ensure that the memory content of the read-only memory is maintained. Likewise, the method according to the present invention can be carried out at much shorter intervals if the memory cells lose their charge much more rapidly.
To achieve this object, the device used according to the present invention employs a refresh circuit. The device according to the present invention may be an integral part of a read-only memory. The read-only memory is preferably part of a microcomputer. The microcomputer is preferably part of a digital controller for a motor vehicle.
The read-only memory can be switched between normal operation, programming operation and test operation (margin read). During programming operation, a programming voltage (V_pp=5 V) is applied to the programming voltage pin. During test operation, a lower test voltage (V_pp 4 V) is applied as programming voltage to the programming voltage pin. During normal operation of the read-only memory, the operating voltage (V_pp=V_cc=3.3 V) is applied to the programming voltage pin.
Switching the read-only memory between programming operation and test operation can be accomplished, for example, with the help of a power supply circuit which is part of the read-only memory. It has a voltage divider with two series-connected resistors, with an electric semiconductor switch (transistor) arranged in parallel with one of the two resistors. The voltage divider is connected to the programming voltage at one end. The other end of the voltage divider is connected to ground. The power supply voltage applied to the programming voltage pin is picked up between the two resistors of the voltage divider. When the transistor is open, the power supply circuit operates as a voltage divider, with the lower test voltage (4 V) being applied to the programming voltage pin. However, one resistor is bridged when the transistor is closed, and the programming voltage (5 V) is applied to the programming voltage pin of the read-only memory.
Another embodiment of the present invention provides a digital controller for controlling refreshing the memory content of at least one memory cell of a read-only memory comprising a refresh circuit for carrying out the method of the present invention. According to this embodiment, the refresh device is not necessarily a part of the read-only memory, but instead it may also be part of the controller, i.e., it may be arranged outside the read-only memory.